<div class="c_nav" id="cnav">
               <div  class="nav_log">
               	  <img src="${s.base}/res/pc/images/dodem.png"   width=150 height=40 alt="dodem.png">
               </div>
                <div class='nav_body'>
               	<div class='nav_group' id="usergroup" tar="${s.base}/admin/depts_json">
                 	<div class='nav_g_title'>权限组</div>
	               	<div  class='nav_items_lay scroll tree_body' >
		               	<ul class='tree_content tree_bd'  >
		               	</ul>
	               </div>
                </div>
               <div class='nav_group' id="groupSource">
                 	<div class='nav_g_title'><a href="#" tar="userdep" class="active">设备<span id="udepcount">(0)</span></a><a href="#" tar="userlist">用户<span id="ucount">(0)</span></a></div>
	               	<div  class='nav_items_lay scroll' >
		               	<div class='nav_items panel'  id="userdep"  >
		               	</div>
		                <div class='nav_items panel'  id="userlist"  style='display:none'>
		               	</div>
	               </div>
               </div>

               </div>
			</div>
			<style >
			   #groupSource  .nav_g_title{
			     	padding:0px
			     }
			      #groupSource  .nav_g_title a{
				    width: 118px;
				    float: left;
				
				    text-align: center;
				     font-size: 14px;
				    
			      }
			     #groupSource  .nav_g_title a:first-child{
			            border-right: 1px solid #fff;
			     }
			     #groupSource  .nav_g_title a:last-child{
			            border-left: 1px solid #000;
			     }
			     #groupSource  .nav_g_title a.active{   
			         background:   linear-gradient(to bottom,rgba(0, 0, 0, 0.39) 16%,rgba(0, 0, 0, 0)16%)
			     }
			     #groupSource  .nav_items input{
			       display:none;
			     }
			</style>
			<script >
			$(function(){
				$("body").on("click","a",function(){
					return false;
				})
				//加载  微信 用户组 部门  
			       loadJSON($("#usergroup"));
				    $("#groupSource .nav_g_title a").on("click",function(){
				    	$("#groupSource .nav_g_title a").removeClass("active");
				        $(this).addClass("active");
				        $("#groupSource .nav_items").hide();
				        $("#"+$(this).attr("tar")).show();
				    	return false;
				    });
				    
			           
			    	  $("body").on("click",".tree_item span",function(){
			    	     	    		
			    	 		    		var _this=$(this).parent().parent();
			    	 		    		
			    	 		    		 if(true){
			    	 		    			// if(!_this.hasClass("select")){
			    	 		    			 $(".tree_item").removeClass("select");
			    	 			    		  _this.addClass("select"); 

			    	 		            	  var _depid=_this.attr("id").substring(1);//$("#userList").attr("tar").match(/[1-9][0-9]*/g); 

			    	 		             	  var items=_this.find(".tree_item.nor");
			    	 		             	  
			    	 		             	  var ids=[];
			    	 		             	  $.each(items,function(){
			    	 		             		  //d+id 去除前缀 d
			    	 		             		 
			    	 		             		  ids.push($(this).attr("id").substring(1));
			    	 		             	  })
			    	 		             	  if(_this.hasClass("nor"))
			    	 		             	  ids.push(_depid);
			    	 		             	  
			    	 		             	  //CONETXT_PATH+"/admin/eqpdetail/
			    	 		             	 var myDate=new Date()
			    	 		      
			    	 		             	 $("#groupSource #userdep").load(CONETXT_PATH+"/admin/eqpddetail?time="+myDate.getTime(),{depids:ids.join(",")},function(){
			    	 		             		 
			    	 		             	 
			    	 		             		 if($("body").hasClass("admin_false"))
			    	 		                  		 $("#groupSource #udepcount").html("("+$("#userdep .level_2").length+"/"+$("#userdep .level_2").length+")");
			    	 		             		 else
			    	 		             		     $("#groupSource #udepcount").html("("+$("#userdep .level_2.online_1").length+"/"+$("#userdep .level_2").length+")");
			    	 		             		 
			    	 		             		 
			    	 		             		
			    	 		             		 
			    	 		             		 var items=$("#userdep .level_2");
			    	 		             		    items.each(function(){
			    	 		             			
			    	 		             		          var _this=$(this);
			    	 		             	 
			    	 		             		           var prname=_this.find(".gprovince").val();
			    	 		             		           var wdata=provinceWeather[prname];
					    	 		  						  if((wdata!=null)&&(wdata.result!=null)){
				    	 		             		        		
					    	 		  								_this.find(".eqp_weather").show();
						    	 		  					    	 $("#m_"+_this.attr("puid")+" .eqp_weather").show();
					    	 		             		            //children 只能选择 直系亲属
					    	 		             		        	 
					    	 		             		            _this.find(".eqp_weather").addClass("d"+wdata.result.data.realtime.weather.img);
					    	 		             		        
					    	 		             		           $("#m_"+_this.attr("puid")+" .eqp_weather").addClass("d"+wdata.result.data.realtime.weather.img)
					    	 		             		           
					    	 		             		            
				    	 		             		        	}
				    	 		  						 
			    	 		             		
			    	 		             		   })
			    	 		             		   $("#groupSource #userdep").trigger('loadok',"data");
			    	 		             		
			    	 	                      });
                                           
			    	 		             	
			    	 		            
			    	 		             	  
			    	 		             	    $.ajax({ 
			    	 					            type:"POST", 
			    	 					            url:CONETXT_PATH+"/admin/dmembers.do", 
			    	 					            dataType:"html",      
			    	 					            contentType:"application/json",               
			    	 					            data: JSON.stringify(ids), 
			    	 					            success:function(data){ 
			    	 					            	//显示保存结果
			    	 					            	
			    	 					            	
			    	 					           $("#groupSource #userlist").html(data);
			    	 					            	
			    	 					     	   $("#groupSource #ucount").html(
															"("
															+ $("#userlist .item").length
															+ ")");;    
			    	 					            } 
			    	 					         });   
			    	 		     
			    	 		    		 }
			    	 	   
			    	 	             	
			    	 	    	});
			})
			
			</script>